<!DOCTYPE html>
<html>
<head>
    <title>Number Example 4</title>
    <script type="text/javascript">
          
        var num1 = Number("Hello world!");  //NaN
        var num2 = Number("");              //0
        var num3 = Number("000011");        //11
        var num4 = Number(true);            //1

        alert(num1);
        alert(num2);
        alert(num3);
        alert(num4);

    </script>

</head>
<body>
  
</body>
</html>